﻿{% extends "admin/base.html" %}
{% load i18n %}

{% block content %}
<div class="wrap">
 	<h2 class="title1">{% trans "Edit comments" %}</h2>
 	<form method="post" action="{% url admin_save_comment user.username, comment.id %}" class="full-width">
	 	<input type="hidden" name="id" value="{{ comment.id }}"/>
	 	<div>
	 		<div class="inner-sidebar">
				<div class="dashboard-window">
					<h3><span class="hndle">{% trans "Status" %}</span></h3>
					<div class="inside">
						<div>
							<a href="{{ comment.content_object.get_absolute_url }}#comment-{{ comment.id }}" 
								class="alignright button" target="_blank">{% trans "View comment" %}</a>
							<div class="clear"></div>
							<div>
								{{ commentform.is_public }} <label for="is_public">{% trans "Approve" %}</label>
							</div>
						</div>
					</div>
					<div class="bottom">
						<div style="display:inline;float:left;line-height: 25px;">
						<a href="javascript:senbz.delete_confirm('{% url admin_delete_comment user.username, comment.id %}')" 
							class="delete" style="padding:2px 2px;">{% trans "Delete" %}</a>
						</div>
						<input type="submit" class="button-primary alignright" tabindex="4" 
							value="{% trans 'Save comment' %}" name="save">
						<div class="clear"></div>
					</div>
				</div>
			</div>
			<div class="has-sidebar">
				<div style="margin-right: 305px;">
					<div class="dashboard-window">
						<h3><label for="name">{% trans "Author" %}</label></h3>
						<div class="inside">
							<table class="form-table">
								<tbody>
									<tr valign="top">
										<td style="width: 150px;">{{ commentform.user_name.label_tag }}</td>
										<td {% if commentform.user_name.errors %}class="error"{% endif %}>
											{{ commentform.user_name }}
											{% if commentform.user_name.errors %}{{ commentform.user_name.errors }}{% endif %}</td>
									</tr>
									<tr valign="top">
										<td>{{ commentform.user_email.label_tag }}</td>
										<td {% if commentform.user_email.errors %}class="error"{% endif %}>
											{{ commentform.user_email }}
											{% if commentform.user_email.errors %}{{ commentform.user_email.errors }}{% endif %}</td>
									</tr>
									<tr valign="top">
										<td>{{ commentform.user_url.label_tag }}</td>
										<td {% if commentform.user_url.errors %}class="error"{% endif %}>
											{{ commentform.user_url }}
											{% if commentform.user_url.errors %}{{ commentform.user_url.errors }}{% endif %}</td>
									</tr>
								</tbody>
							</table>
							<br>
						</div>
					</div>
					<div id="postdiv" class="postarea">
						<div id='editorcontainer'>{{ commentform.comment }}</div>
					</div>
				</div>
			</div>
 		</div>
 	</form>
</div>

{%endblock%}